-
Notifications
You must be signed in to change notification settings - Fork 926
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dev -> main #716
Open
whiterabbit1983
wants to merge
215
commits into
main
Choose a base branch
from
dev
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
dev -> main #716
+53,157
−35,316
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- ELLIPSIS_HIDDEN --> > [!IMPORTANT] > Implement `ToolCallStep` and fix transition logic after `PromptStep` in workflow execution. > > - **ToolCallStep Implementation**: > - Implements `tool_call_step()` in `tool_call_step.py` to handle tool calls, including generating a call ID and validating tool names. > - Updates `STEP_TO_ACTIVITY` in `task_execution/__init__.py` to map `ToolCallStep` to `tool_call_step()`. > - **PromptStep Transition Fix**: > - Updates transition logic in `task_execution/__init__.py` to handle tool calls after a `PromptStep`. > - Removes unused code related to tool calls in `PromptStep` handling. > - **State Machine Update**: > - Updates `valid_transitions` in `tasks.py` to allow 'wait' to 'step' transition. > > <sup>This description was created by </sup>[<img alt="Ellipsis" src="https://img.shields.io/badge/Ellipsis-blue?color=175173">](https://www.ellipsis.dev?ref=julep-ai%2Fjulep&utm_source=github&utm_medium=referral)<sup> for 5ab9e3a. It will automatically update as commits are pushed.</sup> <!-- ELLIPSIS_HIDDEN -->
Co-authored-by: Julep Developers <[email protected]>
Signed-off-by: Diwank Singh Tomer <[email protected]> <!-- ELLIPSIS_HIDDEN --> ---- > [!IMPORTANT] > This PR updates the handling of integrations and systems by adding new models, updating workflows, and modifying session options, along with dependency updates and a migration script. > > - **Behavior**: > - Adds `execute_integration` function in `execute_integration.py` to handle integration tool calls. > - Updates `prompt_step.py` to handle unwrapping of prompt responses and tool call results. > - Modifies `tool_call_step.py` to handle tool calls using `Tool` model. > - **Models**: > - Adds `IntegrationDef` and `SystemDef` models in `Tools.py`. > - Updates `CreateToolRequest`, `PatchToolRequest`, `UpdateToolRequest`, and `Tool` to use `IntegrationDef` and `SystemDef`. > - Adds `forward_tool_results` option to session models in `Sessions.py`. > - **Workflow**: > - Updates `TaskExecutionWorkflow` in `task_execution/__init__.py` to handle integration tool calls. > - **Dependencies**: > - Updates `@typespec/*` dependencies in `package.json` to version `0.60.x`. > - **Migration**: > - Adds migration script `migrate_1727235852_add_forward_tool_calls_option.py` to add `forward_tool_calls` option to sessions. > > <sup>This description was created by </sup>[<img alt="Ellipsis" src="https://img.shields.io/badge/Ellipsis-blue?color=175173">](https://www.ellipsis.dev?ref=julep-ai%2Fjulep&utm_source=github&utm_medium=referral)<sup> for a49aa12. It will automatically update as commits are pushed.</sup> <!-- ELLIPSIS_HIDDEN --> --------- Signed-off-by: Diwank Singh Tomer <[email protected]>
Introduces a new integration service with FastAPI, Docker setup, and support for multiple integrations like DALL-E and Wikipedia. - Integration Service: + Adds integrations-service with Docker setup in docker-compose.yml and Dockerfile. + FastAPI application in web.py with routers for execution and integration management. - Models: + Defines models for DalleImageGenerator, DuckDuckGoSearch, HackerNews, Weather, and Wikipedia in models directory. + IntegrationExecutionRequest and IntegrationExecutionResponse for handling execution requests. - Utilities: + Implements execute_integration in execute_integration.py to handle integration execution logic. + Integration utilities for DALL-E, DuckDuckGo, Hacker News, Weather, and Wikipedia in utils/integrations. - Configuration: + Adds pyproject.toml for dependency management with Poetry. + Adds pytype.toml for type checking configuration.
#521) - **fix(typespec,agents-api): Rename integration providers** - **feat(agents-api,integrations): Working integrations for tool-call step** <!-- ELLIPSIS_HIDDEN --> ---- > [!IMPORTANT] > Add integration service handling for tool-call steps in agents API, including provider renames and workflow updates. > > - **Integrations**: > - Implement `run_integration_service` in `clients/integrations.py` to handle integration service calls. > - Update `execute_integration` in `activities/execute_integration.py` to use `run_integration_service` for non-dummy providers. > - Add `INTEGRATION_SERVICE_URL` to `.env.example`, `env.py`, and `docker-compose.yml`. > - **Renames**: > - Rename integration providers in `Tools.py` and `scalars.tsp` (e.g., `dall-e` to `dalle_image_generator`). > - **Workflows**: > - Update `task_execution/__init__.py` to handle integration tool calls using `execute_integration`. > - **Tests**: > - Add `integration_example.yaml` for sample tasks. > - Add tests for integration tool calls in `test_execution_workflow.py`. > - Add `patch_integration_service` in `utils.py` for mocking integration service calls. > > <sup>This description was created by </sup>[<img alt="Ellipsis" src="https://img.shields.io/badge/Ellipsis-blue?color=175173">](https://www.ellipsis.dev?ref=julep-ai%2Fjulep&utm_source=github&utm_medium=referral)<sup> for f13f8dd. It will automatically update as commits are pushed.</sup> <!-- ELLIPSIS_HIDDEN --> --------- Signed-off-by: Diwank Singh Tomer <[email protected]>
<!-- ELLIPSIS_HIDDEN --> > [!IMPORTANT] > Removes unnecessary transition call in `WaitForInputStep` case in `TaskExecutionWorkflow.run()` and updates tests accordingly. > > - **Behavior**: > - Removes `await transition(context, type="wait", output=output)` from `WaitForInputStep` case in `run()` in `__init__.py`. > - **Tests**: > - Updates `test_execution_workflow.py` to ensure workflow behaves correctly without the removed transition call. > > <sup>This description was created by </sup>[<img alt="Ellipsis" src="https://img.shields.io/badge/Ellipsis-blue?color=175173">](https://www.ellipsis.dev?ref=julep-ai%2Fjulep&utm_source=github&utm_medium=referral)<sup> for 6600cee. It will automatically update as commits are pushed.</sup> <!-- ELLIPSIS_HIDDEN -->
…d Upgrade to python 3.12 (#525) Signed-off-by: Diwank Singh Tomer <[email protected]> <!-- ELLIPSIS_HIDDEN --> ---- > [!IMPORTANT] > Upgrade to Python 3.12 and add support for reading setup arguments from metadata in `agents-api`. > > - **Python Version Upgrade**: > - Upgrade Python to 3.12 in `.tool-versions`, `Dockerfile`, `Dockerfile.worker`, `pyproject.toml`, and `pytype.toml`. > - **Setup Arguments from Metadata**: > - `execute_integration()` in `execute_integration.py` now reads setup arguments from metadata. > - `get_tool_args_from_metadata()` in `get_tool_args_from_metadata.py` updated to handle `arg_type` for "args" and "setup". > - **CI and Documentation**: > - Delete `generate-docs.yml` workflow. > - Update `lint-and-format.yml` to focus on `agents-api` and use Python 3.12. > - Update `pytype` version in `pyproject.toml`. > - Change `x-tool-parameters` to `x-integration-args` in `julep-concepts.md`. > - Adjust backup schedule in `docker-compose.yml` from 1h to 3h. > > <sup>This description was created by </sup>[<img alt="Ellipsis" src="https://img.shields.io/badge/Ellipsis-blue?color=175173">](https://www.ellipsis.dev?ref=julep-ai%2Fjulep&utm_source=github&utm_medium=referral)<sup> for b1c0615. It will automatically update as commits are pushed.</sup> <!-- ELLIPSIS_HIDDEN --> --------- Signed-off-by: Diwank Singh Tomer <[email protected]>
Introduce Docker Bake for building and pushing images with updated GitHub Actions workflows and Dockerfiles. - **GitHub Actions Workflows**: - Add `.github/workflows/dev-push-to-hub.yml` and `.github/workflows/main-push-to-hub.yml` for building and pushing images on `dev` and `main` branch merges. - Remove `push-to-hub.yml` workflow. - **Docker Build System**: - Introduce `docker-bake.hcl` for defining Docker build targets and configurations. - Update Dockerfiles in `agents-api`, `agents-api.worker`, `agents-api.migration` to use Docker Bake. - **Documentation**: - Update `CONTRIBUTING.md` with instructions for building Docker images using Docker Bake. - **Miscellaneous**: - Add submodules for `sdks/node-sdk` and `sdks/python-sdk`.
- **GitHub Actions**: - Add `docker-bake-on-pr.yml` for baking images on pull requests. - Rename `dev-push-to-hub.yml` to `bake-push-to-hub.yml` and `main-push-to-hub.yml` to `latest-push-to-hub.yml`. - Update `bake-push-to-hub.yml` and `latest-push-to-hub.yml` to use `docker/bake-action@v5` and remove branch name and git sha setting steps.
Update GitHub Actions workflow to generate changelog from release notes on release event. - **Workflow Changes**: - Renames workflow from `Changelog CI` to `Changelog on release` in `.github/workflows/changelog-ci.yml`. - Changes trigger from `pull_request` to `release` with type `published`. - **Actions**: - Updates `actions/checkout` from `v2` to `v4` with `fetch-depth: 0` and `ref: dev`. - Replaces `saadmk11/[email protected]` with `rhysd/changelog-from-release/action@v3` to generate changelog from release notes.
Co-authored-by: creatorrr <[email protected]>
Enhance workflows to bake images on release and generate changelogs from release notes. - **Workflows**: - Update `.github/workflows/bake-push-to-hub.yml` to trigger on `release` events in addition to `push` to `dev` and tags `v*`. - Update `.github/workflows/changelog-ci.yml` to trigger on `release` events and generate changelog from release notes using `rhysd/changelog-from-release/action@v3`.
Co-authored-by: creatorrr <[email protected]>
- **Workflow Addition**: - Adds `bandit-security-check-python-agents-api.yml` to `.github/workflows/`. - Triggers on pull requests to the `main` branch. - **Security Check**: - Uses `mdegis/[email protected]` to check Python code in `./agents-api/agents_api`. - Configured with `level: high` and `confidence: high`. - `exit_zero: true` allows workflow to pass even if issues are found.
- **Workflow Configuration**: - Adds `dev` branch to trigger `bandit-security-check-python-agents-api.yml` workflow. - Updates Bandit action version from `v1.1` to `v1.0.1` in the workflow.
…ons service (#540) Add new integrations for Brave, BrowserBase, and Spider, and refactor the integration service to support these changes. - **Integrations**: - Add new providers: `brave`, `browserbase`, and `spider` in `providers.py`. - Refactor existing providers: `wikipedia`, `weather`, `hacker_news`. - **Models**: - Add `BraveSearchSetup`, `BraveSearchArguments`, `BraveSearchOutput` in `brave.py`. - Add `BrowserBaseSetup`, `BrowserBaseLoadArguments`, `BrowserBaseLoadOutput` in `browserbase.py`. - Add `SpiderSetup`, `SpiderFetchArguments`, `SpiderFetchOutput` in `spider.py`. - Update `ExecutionRequest`, `ExecutionResponse` in `execution.py` to include new providers. - **Routers**: - Add `get_integration` in `get_integration.py`. - Add `get_integration_tool` in `get_integration_tool.py`. - Update `execute` in `execute.py` to handle new providers and methods. - **Utilities**: - Refactor `execute_integration` in `execute_integration.py` to dynamically load and execute provider methods. - Add integration logic for new providers in `integrations/utils/integrations/`. - **Misc**: - Update `pyproject.toml` to include new dependencies: `spider-client`, `browserbase`. - Update `scalars.tsp` and `models.tsp` to include new integration providers.
Updated the main image 1-line description
<!-- ELLIPSIS_HIDDEN --> > [!IMPORTANT] > Improves task execution updates by encoding task tokens with metadata and enhancing error handling in `raise_complete_async.py` and `update_execution.py`. > > - **Behavior**: > - In `raise_complete_async.py`, task tokens are now base64 encoded and include metadata with activity, run, and workflow IDs. > - In `update_execution.py`, added error handling for stopping and resuming executions, using metadata for async activity handle retrieval. > - **Database Queries**: > - In `get_paused_execution_token.py`, query updated to include `metadata` and sort by `created_at` with a limit of 1. > - **Error Handling**: > - Added try-except blocks in `update_execution.py` to handle exceptions when stopping or resuming executions. > > <sup>This description was created by </sup>[<img alt="Ellipsis" src="https://img.shields.io/badge/Ellipsis-blue?color=175173">](https://www.ellipsis.dev?ref=julep-ai%2Fjulep&utm_source=github&utm_medium=referral)<sup> for f3de527. It will automatically update as commits are pushed.</sup> <!-- ELLIPSIS_HIDDEN --> --------- Signed-off-by: Diwank Singh Tomer <[email protected]> Co-authored-by: Diwank Singh Tomer <[email protected]>
<!-- ELLIPSIS_HIDDEN --> > [!IMPORTANT] > Fixes `name` attribute in `get_job_status` in `routers.py` and updates string encoding and exception syntax in other files. > > - **Behavior**: > - Fixes `name` attribute in `get_job_status` function in `routers.py` to use `job_description.workflow_type` instead of `handle.id`. > - **Formatting**: > - Adjusts string encoding in `raise_complete_async.py` and `update_execution.py` to use double quotes for `ascii`. > - Updates exception raising syntax in `update_execution.py` for consistency. > > <sup>This description was created by </sup>[<img alt="Ellipsis" src="https://img.shields.io/badge/Ellipsis-blue?color=175173">](https://www.ellipsis.dev?ref=julep-ai%2Fjulep&utm_source=github&utm_medium=referral)<sup> for bfc8490. It will automatically update as commits are pushed.</sup> <!-- ELLIPSIS_HIDDEN -->
…RIBUTING.md file (#543) Added temporal payload decoding route, updated setup instructions in `CONTRIBUTING.md`, and modified Docker and FastAPI configurations. - **New Features**: - Added `/temporal/decode` route in `router.py` for decoding temporal payloads using `PydanticEncodingPayloadConverter`. - **Documentation**: - Updated `CONTRIBUTING.md` with setup instructions, including environment setup, Docker volume creation, and running the project in single or multi-tenant mode. - **Configuration**: - Added `internal.router` to `web.py` to include the new internal routes. - Updated `docker-compose.yml` to expose port `8080` for `agents-api` and `agents-api-multi-tenant` services.
<!-- ELLIPSIS_HIDDEN --> > [!IMPORTANT] > Add `README.md` to `cookbooks` with Jupyter notebook overview and Colab links. > > - **Documentation**: > - Adds `README.md` to `cookbooks` directory. > - Provides an overview of Jupyter notebooks for AI tasks. > - Includes Colab links for each notebook: `01-Website_Crawler_using_Spider.ipynb`, `02-Sarcastic_News_Headline_Generator.ipynb`, `03-SmartResearcher_With_WebSearch.ipynb`, `04-TripPlanner_With_Weather_And_WikiInfo.ipynb`. > - Contact information and contribution guidelines included. > > <sup>This description was created by </sup>[<img alt="Ellipsis" src="https://img.shields.io/badge/Ellipsis-blue?color=175173">](https://www.ellipsis.dev?ref=julep-ai%2Fjulep&utm_source=github&utm_medium=referral)<sup> for a1ad58e. It will automatically update as commits are pushed.</sup> <!-- ELLIPSIS_HIDDEN --> --------- Signed-off-by: Diwank Singh Tomer <[email protected]> Co-authored-by: Diwank Singh Tomer <[email protected]>
Signed-off-by: Diwank Singh Tomer <[email protected]>
Signed-off-by: Diwank Singh Tomer <[email protected]>
…pressions in task creation | Add validation for subworkflows (#570) Closes #535 <!-- ELLIPSIS_HIDDEN --> > [!IMPORTANT] > Add static validation for Python expressions and Jinja templates in task creation and validate subworkflows in `openapi_model.py` and `steps.tsp`. > > - **Validation**: > - Add `validate_python_expression()` and `validate_jinja_template()` in `openapi_model.py`. > - Integrate validation into `EvaluateStep`, `ToolCallStep`, `PromptStep`, `SetStep`, `LogStep`, `ReturnStep`, `YieldStep`, `IfElseWorkflowStep`, and `MapReduceStep` in `openapi_model.py`. > - **Models**: > - Update `CreateTaskRequest` in `openapi_model.py` to validate subworkflows using `WorkflowType`. > - Add `YieldStep` to `MappableWorkflowStep` and `NonConditionalWorkflowStep` in `steps.tsp`. > - **Misc**: > - Reorder `YieldStep` in `Tasks.py` to maintain consistency. > > <sup>This description was created by </sup>[<img alt="Ellipsis" src="https://img.shields.io/badge/Ellipsis-blue?color=175173">](https://www.ellipsis.dev?ref=julep-ai%2Fjulep&utm_source=github&utm_medium=referral)<sup> for 9952ad5. It will automatically update as commits are pushed.</sup> <!-- ELLIPSIS_HIDDEN --> --------- Co-authored-by: Diwank Singh Tomer <[email protected]>
Signed-off-by: Diwank Singh Tomer <[email protected]> <!-- ELLIPSIS_HIDDEN --> ---- > [!IMPORTANT] > Adds detailed code reading and contributing instructions to `CONTRIBUTING.md`, covering project architecture, setup, and contribution guidelines. > > - **Documentation**: > - Adds detailed code reading instructions to `CONTRIBUTING.md`. > - Includes sections on project overview, system architecture, API specifications, core API implementation, database and storage, workflow management, testing, and additional services. > - Provides a step-by-step guide for setting up the development environment and contributing to the project. > > <sup>This description was created by </sup>[<img alt="Ellipsis" src="https://img.shields.io/badge/Ellipsis-blue?color=175173">](https://www.ellipsis.dev?ref=julep-ai%2Fjulep&utm_source=github&utm_medium=referral)<sup> for 4bb3e8c. It will automatically update as commits are pushed.</sup> <!-- ELLIPSIS_HIDDEN --> --------- Signed-off-by: Diwank Singh Tomer <[email protected]>
…573) Signed-off-by: Diwank Singh Tomer <[email protected]> <!-- ELLIPSIS_HIDDEN --> ---- > [!IMPORTANT] > Refactor validation logic using monkeypatching and add new models and custom types in `openapi_model.py`. > > - **Validation Refactor**: > - Switch from subclassing to monkeypatching for validation functions in `EvaluateStep`, `ToolCallStep`, `PromptStep`, `SetStep`, `LogStep`, `ReturnStep`, `YieldStep`, `IfElseWorkflowStep`, and `MapReduceStep`. > - Add validators for Python expressions and Jinja templates. > - **Model Changes**: > - Add `CreateTransitionRequest` and `CreateEntryRequest` classes. > - Define custom types `ChatMLContent`, `ChatMLRole`, `ChatMLSource`, `ExecutionStatus`, and `TransitionType`. > - **Misc**: > - Allow extra fields in `CreateTaskRequest`, `PatchTaskRequest`, and `UpdateTaskRequest` using `ConfigDict`. > > <sup>This description was created by </sup>[<img alt="Ellipsis" src="https://img.shields.io/badge/Ellipsis-blue?color=175173">](https://www.ellipsis.dev?ref=julep-ai%2Fjulep&utm_source=github&utm_medium=referral)<sup> for 8c03d93. It will automatically update as commits are pushed.</sup> <!-- ELLIPSIS_HIDDEN --> Signed-off-by: Diwank Singh Tomer <[email protected]>
Signed-off-by: Diwank Singh Tomer <[email protected]>
Signed-off-by: Diwank Singh Tomer <[email protected]> <!-- ELLIPSIS_HIDDEN --> ---- > [!IMPORTANT] > This pull request adds new tool types for computer-use tools, including computer actions, text editor commands, and bash commands, with updates across models and TypeSpec files. > > - **Behavior**: > - Added new tool types `ChosenComputer20241022`, `ChosenTextEditor20241022`, and `ChosenBash20241022` in `Chat.py` and `Entries.py`. > - Updated `tool_calls` in `MessageModel` to include new tool types. > - **Models**: > - Added models `Computer20241022Def`, `TextEditor20241022Def`, and `Bash20241022Def` in `Tools.py`. > - Added `BaseChosenToolCall` to handle new tool types. > - **TypeSpec**: > - Added `anthropic.tsp` for new tool definitions. > - Updated `models.tsp` to include new tool types in `ToolType` enum. > - **OpenAPI**: > - Updated OpenAPI schema to reflect new tool types in `openapi-1.0.0.yaml`. > > <sup>This description was created by </sup>[<img alt="Ellipsis" src="https://img.shields.io/badge/Ellipsis-blue?color=175173">](https://www.ellipsis.dev?ref=julep-ai%2Fjulep&utm_source=github&utm_medium=referral)<sup> for 0db5d91. It will automatically update as commits are pushed.</sup> <!-- ELLIPSIS_HIDDEN --> --------- Signed-off-by: Diwank Singh Tomer <[email protected]> Co-authored-by: creatorrr <[email protected]>
Signed-off-by: Diwank Singh Tomer <[email protected]> <!-- ELLIPSIS_HIDDEN --> ---- > [!IMPORTANT] > Adds types and integration definitions for browserbase tools, focusing on session management and context creation. > > - **Behavior**: > - Adds types for browserbase tools in `Tools.py` and `main.tsp`. > - Introduces session management and context creation methods. > - **Models**: > - Adds `BrowserbaseCreateSessionArguments`, `BrowserbaseGetSessionArguments`, and other session-related models in `Tools.py`. > - Adds `BaseBrowserbaseIntegrationDef` and `BrowserbaseContextIntegrationDef` models. > - **Integration**: > - Updates `CreateToolRequest`, `PatchToolRequest`, `Tool`, and `UpdateToolRequest` to include browserbase integration definitions. > - Adds `BrowserbaseProviderCard` in `main.tsp` to define provider methods. > - **Misc**: > - Adds `contexts.tsp`, `extensions.tsp`, and `sessions.tsp` for browserbase tool specifications. > - Updates OpenAPI spec in `openapi-1.0.0.yaml` to include new browserbase components. > > <sup>This description was created by </sup>[<img alt="Ellipsis" src="https://img.shields.io/badge/Ellipsis-blue?color=175173">](https://www.ellipsis.dev?ref=julep-ai%2Fjulep&utm_source=github&utm_medium=referral)<sup> for c84c935. It will automatically update as commits are pushed.</sup> <!-- ELLIPSIS_HIDDEN --> Signed-off-by: Diwank Singh Tomer <[email protected]>
<!-- ELLIPSIS_HIDDEN --> > [!IMPORTANT] > Adds `Browserbase` provider and `RemoteBrowser` integration with session management and remote actions to the integrations service. > > - **Behavior**: > - Adds `Browserbase` provider in `providers.py` with session management methods: `list`, `create`, `get`, `complete`, and `get_live_urls`. > - Introduces `RemoteBrowser` integration in `providers.py` with actions like `key`, `type`, `mouse_move`, etc. > - **Models**: > - Adds models to `browserbase.py` for session outputs and `remote_browser.py` for action results. > - Updates `__init__.py` to include new Browserbase models. > - **Dependencies**: > - Adds `selenium`, `playwright`, `httpx`, and `pillow` to `pyproject.toml`. > - **TypeSpec**: > - Defines `Browserbase` and `RemoteBrowser` integration methods in `contexts.tsp`, `extensions.tsp`, `main.tsp`, `sessions.tsp`, and `remote_browser.tsp`. > > <sup>This description was created by </sup>[<img alt="Ellipsis" src="https://img.shields.io/badge/Ellipsis-blue?color=175173">](https://www.ellipsis.dev?ref=julep-ai%2Fjulep&utm_source=github&utm_medium=referral)<sup> for e0d9137. It will automatically update as commits are pushed.</sup> <!-- ELLIPSIS_HIDDEN --> Co-authored-by: HamadaSalhab <[email protected]>
…l` step (#778) <!-- ELLIPSIS_HIDDEN --> > [!IMPORTANT] > Adjusts `ToolCallStep` in `TaskExecutionWorkflow` to handle different integration spec formats with conditional logic for `TaskToolDef`. > > - **Behavior**: > - Adjusts `ToolCallStep` handling in `TaskExecutionWorkflow` to support different integration spec formats. > - Introduces conditional logic to differentiate `TaskToolDef` from other specs, adjusting `provider`, `setup`, and `method` extraction. > - **Misc**: > - Adds `TaskToolDef` import in `__init__.py`. > > <sup>This description was created by </sup>[<img alt="Ellipsis" src="https://img.shields.io/badge/Ellipsis-blue?color=175173">](https://www.ellipsis.dev?ref=julep-ai%2Fjulep&utm_source=github&utm_medium=referral)<sup> for ed1f234. It will automatically update as commits are pushed.</sup> <!-- ELLIPSIS_HIDDEN -->
…#775) <!-- ELLIPSIS_HIDDEN --> > [!IMPORTANT] > Add hotfix for Anthropic API handling in `prompt_step` and introduce TikTok hook generator script. > > - **Behavior**: > - Modify `prompt_step` in `prompt_step.py` to handle Anthropic models using the Anthropic API directly. > - Add `format_anthropic_tools()` to format Anthropic tools for the API call. > - Use `COMPUTER_USE_BETA_FLAG` for Anthropic model beta features. > - **Dependencies**: > - Add `anthropic` package to `pyproject.toml`. > - **Environment**: > - Add `anthropic_api_key` to `env.py` and `docker-compose.yml`. > - **Misc**: > - Import `Anthropic` client in `prompt_step.py`. > - Add `17-Hook-Generator-Trending-Reels.py` for generating TikTok hooks using Julep client. > > <sup>This description was created by </sup>[<img alt="Ellipsis" src="https://img.shields.io/badge/Ellipsis-blue?color=175173">](https://www.ellipsis.dev?ref=julep-ai%2Fjulep&utm_source=github&utm_medium=referral)<sup> for 4dd3f64. It will automatically update as commits are pushed.</sup> <!-- ELLIPSIS_HIDDEN --> --------- Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com> Co-authored-by: Vedantsahai18 <[email protected]>
<!-- ELLIPSIS_HIDDEN --> > [!IMPORTANT] > Implements Maximal Marginal Relevance (MMR) in document search with a new `mmr_strength` parameter, updating search logic and API. > > - **Behavior**: > - Introduces `mmr_strength` parameter in `BaseDocSearchRequest` in `Docs.py` to control MMR behavior. > - Implements MMR logic in `maximal_marginal_relevance()` in `mmr.py`. > - Integrates MMR in `search_user_docs()` and `search_agent_docs()` in `search_docs.py`. > - **Search Logic**: > - Modifies `search_docs_by_embedding()` and `search_docs_hybrid()` to adjust `k` based on `mmr_strength`. > - Adds `embedding` field to `Snippet` model in `Docs.py` and `models.tsp`. > - **Dependencies**: > - Adds `simsimd` to `pyproject.toml` for optimized cosine similarity calculations. > - **Misc**: > - Updates OpenAPI spec in `openapi-1.0.0.yaml` to include `mmr_strength` and `embedding` fields. > > <sup>This description was created by </sup>[<img alt="Ellipsis" src="https://img.shields.io/badge/Ellipsis-blue?color=175173">](https://www.ellipsis.dev?ref=julep-ai%2Fjulep&utm_source=github&utm_medium=referral)<sup> for 583f70a. It will automatically update as commits are pushed.</sup> <!-- ELLIPSIS_HIDDEN --> --------- Signed-off-by: Diwank Singh Tomer <[email protected]> Co-authored-by: Diwank Singh Tomer <[email protected]>
Signed-off-by: Diwank Singh Tomer <[email protected]>
```python from anthropic import Anthropic from anthropic.types.beta.beta_message import BetaMessage from litellm import ChatCompletionMessageToolCall, Function, Message from litellm.types.utils import Choices, ModelResponse # ... # ... # Check if the model is Anthropic and bash/editor/computer use tool is included if "claude" in agent_model.lower() and any( tool.type in ["bash_20241022", "text_editor_20241022", "computer_20241022"] for tool in agent_tools ): # Retrieve the API key from the environment variable betas = [COMPUTER_USE_BETA_FLAG] # Use Anthropic API directly client = Anthropic(api_key=anthropic_api_key) # Claude Response claude_response: BetaMessage = await client.beta.messages.create( model=agent_model, messages=prompt, tools=formatted_agent_tools, max_tokens=1024, betas=betas, ) # Claude returns [ToolUse | TextBlock] # We need to convert tool_use to tool_calls # And set content = TextBlock.text # But we need to ensure no more than one text block is returned if ( len([block for block in claude_response.content if block.type == "text"]) > 1 ): raise ApplicationError("Claude should only return one message") text_block = next( (block for block in claude_response.content if block.type == "text"), None, ) stop_reason = claude_response.stop_reason if stop_reason == "tool_use": choice = Choices( message=Message( role="assistant", content=text_block.text if text_block else None, tool_calls=[ ChatCompletionMessageToolCall( type="function", function=Function( name=block.name, arguments=block.input, ), ) for block in claude_response.content if block.type == "tool_use" ], ), finish_reason="tool_calls", ) else: assert text_block, "Claude should always return a text block for stop_reason=stop" choice = Choices( message=Message( role="assistant", content=text_block.text, ), finish_reason="stop", ) ``` <!-- ELLIPSIS_HIDDEN --> ---- > [!IMPORTANT] > Adds support for Anthropic Claude model with new tool types, updates models, and fixes a bug in `execute_system.py`. > > - **Behavior**: > - Adds support for Anthropic Claude model with `computer_20241022`, `text_editor_20241022`, and `bash_20241022` tools in `prompt_step.py`. > - Handles tool use in Claude responses, raising an error if multiple messages are returned. > - **Models**: > - Adds `type` field to `Tool`, `CreateToolRequest`, `PatchToolRequest`, and `UpdateToolRequest` models. > - Updates `ToolType` enum to include new tool types. > - **Misc**: > - Fixes a bug in `execute_system.py` related to `delete` operation handling. > - Imports `AsyncAnthropic` in `prompt_step.py` for asynchronous API calls. > > <sup>This description was created by </sup>[<img alt="Ellipsis" src="https://img.shields.io/badge/Ellipsis-blue?color=175173">](https://www.ellipsis.dev?ref=julep-ai%2Fjulep&utm_source=github&utm_medium=referral)<sup> for 5867ecb. It will automatically update as commits are pushed.</sup> <!-- ELLIPSIS_HIDDEN --> --------- Co-authored-by: vedantsahai18 <[email protected]> Co-authored-by: Vedantsahai18 <[email protected]>
Closes #723 Signed-off-by: Diwank Singh Tomer <[email protected]> <!-- ELLIPSIS_HIDDEN --> ---- > [!IMPORTANT] > This PR updates type definitions, modifies default values, and enhances Jinja environment setup for improved functionality and maintainability. > > - **Behavior**: > - Changed default value of `inherit_tools` to `false` in `CreateTaskRequest`, `PatchTaskRequest`, and `UpdateTaskRequest` in `Tasks.py` and `Tools.py`. > - Added `label` field to various workflow step models in `Tasks.py` for step referencing. > - Updated `id` type from `UUID` to `string` in `ToolRefById` and `ToolResponse` in `Tools.py`. > - **Jinja Environment**: > - Consolidated Jinja environment globals setup in `template.py` using `constants`, `stdlib`, and `ALLOWED_FUNCTIONS`. > - **Misc**: > - Added `schema_` field to `ApiCallDef` in `Tools.py` for response schema definition. > - Updated `litellm` version in `pyproject.toml` to `^1.51.2`. > - Marked a test as skipped in `test_docs_routes.py` due to random CI failures. > > <sup>This description was created by </sup>[<img alt="Ellipsis" src="https://img.shields.io/badge/Ellipsis-blue?color=175173">](https://www.ellipsis.dev?ref=julep-ai%2Fjulep&utm_source=github&utm_medium=referral)<sup> for 1b0f870. It will automatically update as commits are pushed.</sup> <!-- ELLIPSIS_HIDDEN --> Signed-off-by: Diwank Singh Tomer <[email protected]>
Signed-off-by: Diwank Singh Tomer <[email protected]> <!-- ELLIPSIS_HIDDEN --> ---- > [!IMPORTANT] > Refactor `agents-api` to improve tool conversion and system call handling by centralizing handler logic and streamlining argument processing. > > - **Behavior**: > - Refactor `execute_system` in `execute_system.py` to use `get_handler` for handler retrieval and streamline argument transformation. > - Update `prompt_step` in `prompt_step.py` to format tools using `format_tool` and handle tool types more effectively. > - Modify `tool_call_step` in `tool_call_step.py` to construct tool calls using `construct_tool_call` and handle different tool types. > - **Utilities**: > - Add `get_handler` function in `utils.py` to centralize handler retrieval logic based on `SystemDef`. > - Introduce `_create_search_request` in `execute_system.py` to handle search request creation. > - **Models**: > - Update `ExecutionInput` and `StepContext` in `tasks.py` to support `CreateToolRequest` alongside `Tool`. > - **Workflows**: > - Adjust `TaskExecutionWorkflow` in `task_execution/__init__.py` to handle tool calls and system calls using the refactored logic. > - **Misc**: > - Add `langchain-core` dependency in `pyproject.toml`. > > <sup>This description was created by </sup>[<img alt="Ellipsis" src="https://img.shields.io/badge/Ellipsis-blue?color=175173">](https://www.ellipsis.dev?ref=julep-ai%2Fjulep&utm_source=github&utm_medium=referral)<sup> for 0af2684. It will automatically update as commits are pushed.</sup> <!-- ELLIPSIS_HIDDEN --> --------- Signed-off-by: Diwank Singh Tomer <[email protected]> Co-authored-by: vedantsahai18 <[email protected]> Co-authored-by: Vedantsahai18 <[email protected]>
<!-- ELLIPSIS_HIDDEN --> > [!IMPORTANT] > Add `session.chat` system tool for chat operations, refactor `base_evaluate` for nested expressions, and update models for complex expression handling. > > - **Behavior**: > - Add `session.chat` operation handling in `execute_system.py` for chat operations within sessions. > - Update `get_handler` in `utils.py` to support `session.chat` operation. > - **Evaluation**: > - Refactor `base_evaluate` in `base_evaluate.py` to use `_recursive_evaluate()` for handling nested expressions. > - **Models**: > - Update `EvaluateStep`, `ReturnStep`, `ToolCallStep`, `WaitForInputInfo`, and `YieldStep` in `Tasks.py` to support nested expressions. > - Modify `ExpressionObject` and `NestedExpressionObject` in `steps.tsp` to handle complex expression structures. > - **Environment**: > - Adjust `use_blob_store_for_temporal` in `env.py` to disable during testing. > > <sup>This description was created by </sup>[<img alt="Ellipsis" src="https://img.shields.io/badge/Ellipsis-blue?color=175173">](https://www.ellipsis.dev?ref=julep-ai%2Fjulep&utm_source=github&utm_medium=referral)<sup> for 8047d4a. It will automatically update as commits are pushed.</sup> <!-- ELLIPSIS_HIDDEN --> --------- Co-authored-by: HamadaSalhab <[email protected]>
<!-- ELLIPSIS_HIDDEN --> > [!IMPORTANT] > Add `connect_url` to `RemoteBrowserArguments` for remote browser connection setup, updating TypeSpec and OpenAPI specs. > > - **Behavior**: > - Add `connect_url` field to `RemoteBrowserArguments` in `remote_browser.tsp` for specifying the connection URL. > - Update OpenAPI spec in `openapi-1.0.0.yaml` to include `connect_url` as a required field in `Tools.RemoteBrowserArguments` and optional in `Tools.RemoteBrowserArgumentsUpdate`. > - Modify `perform_action` in `remote_browser.py` to use `connect_url` from `RemoteBrowserSetup` or `RemoteBrowserArguments` for connection. > - **Models**: > - Add `connect_url` to `RemoteBrowserArguments` and `RemoteBrowserArgumentsUpdate` in `Tools.py`. > - Update `RemoteBrowserSetup` and `RemoteBrowserSetupUpdate` to use `Annotated[str | None, Field(...)]` for `connect_url`. > - **Misc**: > - Ensure `connect_url` is nullable in OpenAPI spec for `RemoteBrowserSetup` and `RemoteBrowserSetupUpdate`. > > <sup>This description was created by </sup>[<img alt="Ellipsis" src="https://img.shields.io/badge/Ellipsis-blue?color=175173">](https://www.ellipsis.dev?ref=julep-ai%2Fjulep&utm_source=github&utm_medium=referral)<sup> for 2c5902e. It will automatically update as commits are pushed.</sup> <!-- ELLIPSIS_HIDDEN --> --------- Co-authored-by: Diwank Singh Tomer <[email protected]>
Made changes so that a fully typed JSON object is returned by Brave Search . This fixes issue #771 <!-- ELLIPSIS_HIDDEN --> ---- > [!IMPORTANT] > Parse Brave Search JSON output into `SearchResult` objects and update `BraveSearchOutput` to return a list of these objects. > > - **Behavior**: > - `search()` in `brave.py` now parses JSON results into `SearchResult` objects. > - `BraveSearchOutput` now returns a list of `SearchResult` instead of a single string. > - **Models**: > - Adds `SearchResult` model in `brave.py` with `title`, `link`, and `snippet` fields. > - Updates `BraveSearchOutput` in `brave.py` to use `List[SearchResult]` for `result`. > > <sup>This description was created by </sup>[<img alt="Ellipsis" src="https://img.shields.io/badge/Ellipsis-blue?color=175173">](https://www.ellipsis.dev?ref=julep-ai%2Fjulep&utm_source=github&utm_medium=referral)<sup> for 61e813a. It will automatically update as commits are pushed.</sup> <!-- ELLIPSIS_HIDDEN --> --------- Co-authored-by: Diwank Singh Tomer <[email protected]> Co-authored-by: vedantsahai18 <[email protected]>
- **wip(agents-api): Auto-run tools in prompt steps** - **refactor: Lint integrations-service (CI)** - **feat(agents-api): Add python expression support to prompt step** - **feat(agents-api): Default prompt_step.tools = 'all'** <!-- ELLIPSIS_HIDDEN --> ---- > [!IMPORTANT] > Add Python expression support to prompt steps in agents API, with default tool settings and refactoring. > > - **Behavior**: > - Add Python expression evaluation for prompts starting with `$_` in `prompt_step()` in `prompt_step.py`. > - Default `tools` in `PromptStep` to `'all'` in `Tasks.py`. > - Default `auto_run_tools` to `True` for `PromptStep` and `False` for sessions in `Sessions.py` and `Tasks.py`. > - **Refactoring**: > - Remove unused import `Developer` from `execute_system.py`. > - Remove unused import `RootModel` from `Tools.py`. > - Linting changes in `integrations-service`. > - **Testing**: > - Add test for prompt step with Python expression in `test_execution_workflow.py`. > > <sup>This description was created by </sup>[<img alt="Ellipsis" src="https://img.shields.io/badge/Ellipsis-blue?color=175173">](https://www.ellipsis.dev?ref=julep-ai%2Fjulep&utm_source=github&utm_medium=referral)<sup> for 4254083. It will automatically update as commits are pushed.</sup> <!-- ELLIPSIS_HIDDEN --> --------- Signed-off-by: Diwank Singh Tomer <[email protected]> Co-authored-by: creatorrr <[email protected]>
… integrations (#784) <!-- ELLIPSIS_HIDDEN --> > [!IMPORTANT] > Fixes Browserbase and RemoteBrowser integrations by adding new fields, making arguments optional, and changing URL types. > > - **Behavior**: > - Add `project_id`, `api_url`, and `connect_url` fields to `BrowserbaseSetup` and `BrowserbaseSetupUpdate` in `Tools.py`. > - Make `arguments` optional in several `IntegrationDef` classes in `Tools.py`. > - Change `connect_url` type from `AnyUrl` to `str` in `RemoteBrowserSetup` and `RemoteBrowserSetupUpdate` in `Tools.py`. > - **Models**: > - Update `SessionInfo`, `BrowserbaseCreateSessionOutput`, and `BrowserbaseGetSessionOutput` in `browserbase.py` to allow `None` for several fields. > - Add `BrowserbaseContextOutput` to `browserbase.py`. > - Update `ExecutionArguments` and `ExecutionResponse` in `execution.py` to include new Browserbase and RemoteBrowser models. > - **Misc**: > - Remove unused imports in `get_integrations.py` and `execute_integration.py`. > - Add `project_id`, `api_url`, and `connect_url` to `get_browserbase_client()` in `browserbase.py`. > > <sup>This description was created by </sup>[<img alt="Ellipsis" src="https://img.shields.io/badge/Ellipsis-blue?color=175173">](https://www.ellipsis.dev?ref=julep-ai%2Fjulep&utm_source=github&utm_medium=referral)<sup> for 40734ad. It will automatically update as commits are pushed.</sup> <!-- ELLIPSIS_HIDDEN --> --------- Signed-off-by: Diwank Singh Tomer <[email protected]> Co-authored-by: HamadaSalhab <[email protected]> Co-authored-by: Diwank Singh Tomer <[email protected]> Co-authored-by: creatorrr <[email protected]> Co-authored-by: aarya-16 <[email protected]> Co-authored-by: vedantsahai18 <[email protected]>
<!-- ELLIPSIS_HIDDEN --> > [!IMPORTANT] > Replaced constant `k` with `search_params.limit` for dynamic document processing in search functions and updated models. > > - **Behavior**: > - Replace constant `k` with `search_params.limit` in `search_user_docs()` and `search_agent_docs()` for `maximal_marginal_relevance()` call. > - Allows dynamic control over document processing based on `search_params.limit`. > - **Functions**: > - Affects `search_user_docs()` and `search_agent_docs()` in `search_docs.py`. > - **Models**: > - Change `snippets` to `snippet` in `DocReference` in `Docs.py` and `models.tsp`. > - **Misc**: > - Add `RootModel` import in `Tools.py`. > > <sup>This description was created by </sup>[<img alt="Ellipsis" src="https://img.shields.io/badge/Ellipsis-blue?color=175173">](https://www.ellipsis.dev?ref=julep-ai%2Fjulep&utm_source=github&utm_medium=referral)<sup> for 4c47490. It will automatically update as commits are pushed.</sup> <!-- ELLIPSIS_HIDDEN -->
<!-- ELLIPSIS_HIDDEN --> > [!IMPORTANT] > Refines Remote Browser functionality by removing `wait_for_load`, updating models, and enhancing `PlaywrightActions` with error handling and screenshot capabilities. > > - **Behavior**: > - Removed `wait_for_load` action from `RemoteBrowserArguments` and `RemoteBrowserArgumentsUpdate`. > - Updated `task_to_spec()` in `tasks.py` to exclude `task_id`, `id`, and `agent_id`. > - Modified `create_task()` and `create_or_update_task()` to return query results directly. > - **Models**: > - Updated `RemoteBrowserSetup` to remove `RemoteBrowserSetupUpdate` and its fields. > - Refined `RemoteBrowserOutput` to include `output`, `error`, `base64_image`, and `system` fields. > - **Functions**: > - Enhanced `PlaywrightActions` with `_with_error_and_screenshot` decorator for error handling and screenshots. > - Added methods `_get_screen_size()`, `_set_screen_size()`, `_wait_for_load()`, `_execute_javascript()`, `_set_window_vars()`, `_get_mouse_coordinates()`, and `_get_element_coordinates()`. > - **Misc**: > - Removed `spec_to_task` import from `get_task.py` and `list_tasks.py`. > > <sup>This description was created by </sup>[<img alt="Ellipsis" src="https://img.shields.io/badge/Ellipsis-blue?color=175173">](https://www.ellipsis.dev?ref=julep-ai%2Fjulep&utm_source=github&utm_medium=referral)<sup> for c8ef196. It will automatically update as commits are pushed.</sup> <!-- ELLIPSIS_HIDDEN --> --------- Signed-off-by: Diwank Singh Tomer <[email protected]> Co-authored-by: creatorrr <[email protected]> Co-authored-by: HamadaSalhab <[email protected]> Co-authored-by: HamadaSalhab <[email protected]>
Signed-off-by: Diwank Singh Tomer <[email protected]>
…n types (#801) Previously, the error messages on validation errors were horrendous. The following input would have yielded a huge, unreadable mess as an error message. This happened because we make heavy use of union types and pydantic tries to unify each type and collects the error for each one of them. Fixed by returning only the deepest matching exceptions. ### Input ```yaml name: Browserbase Task tools: - name: computer type: computer_20241022 computer_20241022: display_height_px: 768 display_width_px: 1024 display_number: 1 - name: spider_crawler type: integration integration: provider: spider setup: spider_api_key: "sk-8d6285a0-7b9f-493d-bcf4-3e15e68b1304" main: - tool: spider_crawler arguments: url: "'https://julep.ai'" - prompt: - role: useaar # <---- the problem content: hi ``` ### New error format ```python {'errors': ["Input should be 'user', 'assistant', 'system', 'function', 'function_response', 'function_call' or 'auto'"], 'offending_input': {'prompt': [{'role': 'useaar', 'content': 'hi'}]}, 'location': ['main', 1, 'PromptStep', 'prompt', 'list[PromptItem]', 0, 'role']} ``` ```json { "errors": [ "Input should be 'user', 'assistant', 'system', 'function', 'function_response', 'function_call' or 'auto'" ], "offending_input": { "prompt": [ { "role": "useaar", "content": "hi" } ] }, "location": [ "main", 1, "PromptStep", "prompt", "list[PromptItem]", 0, "role" ] } ``` ### Previous error format ```python [{'type': 'missing', 'loc': ('body', 'main', 1, 'EvaluateStep', 'evaluate'), 'msg': 'Field required', 'input': {'prompt': [{'role': 'useaar', 'content': 'hi'}]}}, {'type': 'missing', 'loc': ('body', 'main', 1, 'ToolCallStep', 'tool'), 'msg': 'Field required', 'input': {'prompt': [{'role': 'useaar', 'content': 'hi'}]}}, {'type': 'literal_error', 'loc': ('body', 'main', 1, 'PromptStep', 'prompt', 'list[PromptItem]', 0, 'role'), 'msg': "Input should be 'user', 'assistant', 'system', 'function', 'function_response', 'function_call' or 'auto'", 'input': 'useaar', 'ctx': {'expected': "'user', 'assistant', 'system', 'function', 'function_response', 'function_call' or 'auto'"}}, {'type': 'string_type', 'loc': ('body', 'main', 1, 'PromptStep', 'prompt', 'str'), 'msg': 'Input should be a valid string', 'input': [{'role': 'useaar', 'content': 'hi'}]}, {'type': 'missing', 'loc': ('body', 'main', 1, 'GetStep', 'get'), 'msg': 'Field required', 'input': {'prompt': [{'role': 'useaar', 'content': 'hi'}]}}, {'type': 'missing', 'loc': ('body', 'main', 1, 'SetStep', 'set'), 'msg': 'Field required', 'input': {'prompt': [{'role': 'useaar', 'content': 'hi'}]}}, {'type': 'missing', 'loc': ('body', 'main', 1, 'LogStep', 'log'), 'msg': 'Field required', 'input': {'prompt': [{'role': 'useaar', 'content': 'hi'}]}}, {'type': 'missing', 'loc': ('body', 'main', 1, 'YieldStep', 'workflow'), 'msg': 'Field required', 'input': {'prompt': [{'role': 'useaar', 'content': 'hi'}]}}, {'type': 'missing', 'loc': ('body', 'main', 1, 'ReturnStep', 'return'), 'msg': 'Field required', 'input': {'prompt': [{'role': 'useaar', 'content': 'hi'}]}}, {'type': 'missing', 'loc': ('body', 'main', 1, 'SleepStep', 'sleep'), 'msg': 'Field required', 'input': {'prompt': [{'role': 'useaar', 'content': 'hi'}]}}, {'type': 'missing', 'loc': ('body', 'main', 1, 'ErrorWorkflowStep', 'error'), 'msg': 'Field required', 'input': {'prompt': [{'role': 'useaar', 'content': 'hi'}]}}, {'type': 'missing', 'loc': ('body', 'main', 1, 'WaitForInputStep', 'wait_for_input'), 'msg': 'Field required', 'input': {'prompt': [{'role': 'useaar', 'content': 'hi'}]}}, {'type': 'missing', 'loc': ('body', 'main', 1, 'IfElseWorkflowStep', 'if'), 'msg': 'Field required', 'input': {'prompt': [{'role': 'useaar', 'content': 'hi'}]}}, {'type': 'missing', 'loc': ('body', 'main', 1, 'IfElseWorkflowStep', 'then'), 'msg': 'Field required', 'input': {'prompt': [{'role': 'useaar', 'content': 'hi'}]}}, {'type': 'missing', 'loc': ('body', 'main', 1, 'SwitchStep', 'switch'), 'msg': 'Field required', 'input': {'prompt': [{'role': 'useaar', 'content': 'hi'}]}}, {'type': 'missing', 'loc': ('body', 'main', 1, 'ForeachStep', 'foreach'), 'msg': 'Field required', 'input': {'prompt': [{'role': 'useaar', 'content': 'hi'}]}}, {'type': 'missing', 'loc': ('body', 'main', 1, 'ParallelStep', 'parallel'), 'msg': 'Field required', 'input': {'prompt': [{'role': 'useaar', 'content': 'hi'}]}}, {'type': 'missing', 'loc': ('body', 'main', 1, 'Main', 'over'), 'msg': 'Field required', 'input': {'prompt': [{'role': 'useaar', 'content': 'hi'}]}}, {'type': 'missing', 'loc': ('body', 'main', 1, 'Main', 'map'), 'msg': 'Field required', 'input': {'prompt': [{'role': 'useaar', 'content': 'hi'}]}}] ``` ```json [ { "type": "missing", "loc": [ "body", "main", 1, "EvaluateStep", "evaluate" ], "msg": "Field required", "input": { "prompt": [ { "role": "useaar", "content": "hi" } ] } }, { "type": "missing", "loc": [ "body", "main", 1, "ToolCallStep", "tool" ], "msg": "Field required", "input": { "prompt": [ { "role": "useaar", "content": "hi" } ] } }, { "type": "literal_error", "loc": [ "body", "main", 1, "PromptStep", "prompt", "list[PromptItem]", 0, "role" ], "msg": "Input should be 'user', 'assistant', 'system', 'function', 'function_response', 'function_call' or 'auto'", "input": "useaar", "ctx": { "expected": "'user', 'assistant', 'system', 'function', 'function_response', 'function_call' or 'auto'" } }, { "type": "string_type", "loc": [ "body", "main", 1, "PromptStep", "prompt", "str" ], "msg": "Input should be a valid string", "input": [ { "role": "useaar", "content": "hi" } ] }, { "type": "missing", "loc": [ "body", "main", 1, "GetStep", "get" ], "msg": "Field required", "input": { "prompt": [ { "role": "useaar", "content": "hi" } ] } }, { "type": "missing", "loc": [ "body", "main", 1, "SetStep", "set" ], "msg": "Field required", "input": { "prompt": [ { "role": "useaar", "content": "hi" } ] } }, { "type": "missing", "loc": [ "body", "main", 1, "LogStep", "log" ], "msg": "Field required", "input": { "prompt": [ { "role": "useaar", "content": "hi" } ] } }, { "type": "missing", "loc": [ "body", "main", 1, "YieldStep", "workflow" ], "msg": "Field required", "input": { "prompt": [ { "role": "useaar", "content": "hi" } ] } }, { "type": "missing", "loc": [ "body", "main", 1, "ReturnStep", "return" ], "msg": "Field required", "input": { "prompt": [ { "role": "useaar", "content": "hi" } ] } }, { "type": "missing", "loc": [ "body", "main", 1, "SleepStep", "sleep" ], "msg": "Field required", "input": { "prompt": [ { "role": "useaar", "content": "hi" } ] } }, { "type": "missing", "loc": [ "body", "main", 1, "ErrorWorkflowStep", "error" ], "msg": "Field required", "input": { "prompt": [ { "role": "useaar", "content": "hi" } ] } }, { "type": "missing", "loc": [ "body", "main", 1, "WaitForInputStep", "wait_for_input" ], "msg": "Field required", "input": { "prompt": [ { "role": "useaar", "content": "hi" } ] } }, { "type": "missing", "loc": [ "body", "main", 1, "IfElseWorkflowStep", "if" ], "msg": "Field required", "input": { "prompt": [ { "role": "useaar", "content": "hi" } ] } }, { "type": "missing", "loc": [ "body", "main", 1, "IfElseWorkflowStep", "then" ], "msg": "Field required", "input": { "prompt": [ { "role": "useaar", "content": "hi" } ] } }, { "type": "missing", "loc": [ "body", "main", 1, "SwitchStep", "switch" ], "msg": "Field required", "input": { "prompt": [ { "role": "useaar", "content": "hi" } ] } }, { "type": "missing", "loc": [ "body", "main", 1, "ForeachStep", "foreach" ], "msg": "Field required", "input": { "prompt": [ { "role": "useaar", "content": "hi" } ] } }, { "type": "missing", "loc": [ "body", "main", 1, "ParallelStep", "parallel" ], "msg": "Field required", "input": { "prompt": [ { "role": "useaar", "content": "hi" } ] } }, { "type": "missing", "loc": [ "body", "main", 1, "Main", "over" ], "msg": "Field required", "input": { "prompt": [ { "role": "useaar", "content": "hi" } ] } }, { "type": "missing", "loc": [ "body", "main", 1, "Main", "map" ], "msg": "Field required", "input": { "prompt": [ { "role": "useaar", "content": "hi" } ] } } ] ``` <!-- ELLIPSIS_HIDDEN --> ---- > [!IMPORTANT] > Enhance error reporting for `ValidationError` and `RequestValidationError` in `make_exception_handler` by providing detailed error information. > > - **Error Handling**: > - Enhance `make_exception_handler` in `web.py` to improve error reporting for `ValidationError` and `RequestValidationError`. > - Extracts deepest matching errors, common location, and offending input for better clarity. > - Returns only the error messages in the response. > > <sup>This description was created by </sup>[<img alt="Ellipsis" src="https://img.shields.io/badge/Ellipsis-blue?color=175173">](https://www.ellipsis.dev?ref=julep-ai%2Fjulep&utm_source=github&utm_medium=referral)<sup> for 5292f57. It will automatically update as commits are pushed.</sup> <!-- ELLIPSIS_HIDDEN --> --------- Signed-off-by: Diwank Singh Tomer <[email protected]> Co-authored-by: creatorrr <[email protected]> Co-authored-by: vedantsahai18 <[email protected]>
Signed-off-by: Diwank Singh Tomer <[email protected]>
Fix error type handling in web.py <!-- ELLIPSIS_HIDDEN --> ---- > [!IMPORTANT] > Fixes error message extraction and type handling in `_handler()` in `web.py` to improve error handling robustness. > > - **Behavior**: > - Fixes error message extraction in `_handler()` in `web.py` to handle cases where `msg` attribute is missing in error objects. > - **Type Handling**: > - Uses `cast` to ensure `exc` is of type `Union[ValidationError, RequestValidationError]` in `_handler()` in `web.py`. > > <sup>This description was created by </sup>[<img alt="Ellipsis" src="https://img.shields.io/badge/Ellipsis-blue?color=175173">](https://www.ellipsis.dev?ref=julep-ai%2Fjulep&utm_source=github&utm_medium=referral)<sup> for 6ed8d64. It will automatically update as commits are pushed.</sup> <!-- ELLIPSIS_HIDDEN --> --------- Co-authored-by: Ahmad-mtos <[email protected]> Co-authored-by: Diwank Singh Tomer <[email protected]> Co-authored-by: creatorrr <[email protected]>
<!-- ELLIPSIS_HIDDEN --> > [!IMPORTANT] > Enhance agents API by refining prompt step settings, tool formatting, and adding comprehensive docstrings across models and routers. > > - **Behavior**: > - In `execute_system.py`, modify argument transformation for doc-related operations to exclude 'create' and 'search'. > - In `prompt_step.py`, update prompt step settings to exclude specific keys and format tools using `get_handler_with_filtered_params()`. > - **Functions**: > - Add `get_handler_with_filtered_params()` in `utils.py` to filter out problematic parameters for JSON schema serialization. > - **Models**: > - Add docstrings to `create_doc.py`, `list_docs.py`, `update_session.py`, `create_task.py`, `delete_task.py`, `get_task.py`, `list_tasks.py`, `update_task.py`, `get_user.py`, and `list_users.py`. > - Rename `id` to `doc_id` in `create_doc.py`. > - **Routers**: > - Add docstrings to `create_doc.py`, `search_docs.py`, and `chat.py`. > - **Misc**: > - Rename `get_handler()` to `get_handler_with_filtered_params()` in `prompt_step.py`. > > <sup>This description was created by </sup>[<img alt="Ellipsis" src="https://img.shields.io/badge/Ellipsis-blue?color=175173">](https://www.ellipsis.dev?ref=julep-ai%2Fjulep&utm_source=github&utm_medium=referral)<sup> for 60623ea. It will automatically update as commits are pushed.</sup> <!-- ELLIPSIS_HIDDEN --> --------- Co-authored-by: HamadaSalhab <[email protected]> Co-authored-by: Diwank Singh Tomer <[email protected]>
<!-- ELLIPSIS_HIDDEN --> > [!IMPORTANT] > In `prompt_step`, set `formatted_tools` to `None` for non-Anthropic models as tool calls are not implemented. > > - **Behavior**: > - In `prompt_step`, set `formatted_tools` to `None` for non-Anthropic models as tool calls are not implemented. > - **Comments**: > - Added FIXME comment indicating the hardcoded `None` value for `formatted_tools` due to unimplemented tool calls. > > <sup>This description was created by </sup>[<img alt="Ellipsis" src="https://img.shields.io/badge/Ellipsis-blue?color=175173">](https://www.ellipsis.dev?ref=julep-ai%2Fjulep&utm_source=github&utm_medium=referral)<sup> for 366b845. It will automatically update as commits are pushed.</sup> <!-- ELLIPSIS_HIDDEN -->
…t for `transition_step` (#808) <!-- ELLIPSIS_HIDDEN --> > [!IMPORTANT] > Add `mmr_strength` to search requests and increase `transition_step` timeout based on environment in `agents-api`. > > - **Behavior**: > - Add `mmr_strength` parameter to `_create_search_request()` in `execute_system.py` for `HybridDocSearchRequest`, `TextOnlyDocSearchRequest`, and `VectorDocSearchRequest`. > - Increase `schedule_to_close_timeout` for `transition_step` in `transition.py` to 600 seconds unless in debug or testing mode. > - **Misc**: > - Import `debug` and `testing` from `env` in `transition.py`. > > <sup>This description was created by </sup>[<img alt="Ellipsis" src="https://img.shields.io/badge/Ellipsis-blue?color=175173">](https://www.ellipsis.dev?ref=julep-ai%2Fjulep&utm_source=github&utm_medium=referral)<sup> for bd64aa2. It will automatically update as commits are pushed.</sup> <!-- ELLIPSIS_HIDDEN -->
… decoding (#809) <!-- ELLIPSIS_HIDDEN --> > [!IMPORTANT] > Improves payload decoding and routing in agents-api with enhanced error handling and compatibility checks. > > - **Behavior**: > - Enhanced `decode_payloads()` in `internal/router.py` to handle Pydantic models, bytes, and metadata more robustly. > - Added error handling for payload decoding failures, logging errors in `internal/router.py`. > - **Codec**: > - Updated `from_payload()` in `codec.py` to include explicit checks for encoding and Python version compatibility. > - Added logging for decoding failures in `codec.py`. > - **Routing**: > - Added `agents-api-internal` route in `traefik.yml.template` for `/api/temporal/{path:.*}` with higher priority than general route. > > <sup>This description was created by </sup>[<img alt="Ellipsis" src="https://img.shields.io/badge/Ellipsis-blue?color=175173">](https://www.ellipsis.dev?ref=julep-ai%2Fjulep&utm_source=github&utm_medium=referral)<sup> for 75e2363. It will automatically update as commits are pushed.</sup> <!-- ELLIPSIS_HIDDEN --> --------- Co-authored-by: standard-input[bot] <183254018+standard-input[bot]@users.noreply.github.com> Co-authored-by: Vedantsahai18 <[email protected]>
…call execution (#811) <!-- ELLIPSIS_HIDDEN --> > [!IMPORTANT] > Merge headers from `request_args` and `api_call` in `execute_api_call` to ensure both are included in API requests. > > - **Behavior**: > - In `execute_api_call` in `excecute_api_call.py`, headers from `request_args` and `api_call` are now merged using `{**(arg_headers or {}), **(api_call.headers or {})}`. > - This change ensures that headers from both sources are included in the API request, with `request_args` headers taking precedence in case of conflicts. > > <sup>This description was created by </sup>[<img alt="Ellipsis" src="https://img.shields.io/badge/Ellipsis-blue?color=175173">](https://www.ellipsis.dev?ref=julep-ai%2Fjulep&utm_source=github&utm_medium=referral)<sup> for 1e5d2d2. It will automatically update as commits are pushed.</sup> <!-- ELLIPSIS_HIDDEN -->
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.